package com.team.util;

/**
 * Created by Hasee on 2022-06-24.
 */
public enum StatusShengJIEnum {
    QIYONG(1,"启用"),JINYONG(0,"禁用");
    private String name;
    private Integer id;

     StatusShengJIEnum(Integer id,String name){
       this.id = id;
       this.name = name;
    }

    public String getName() {
        return name;
    }
    public Integer getId() {
        return id;
    }

    public static String queryNameById(Integer id){
         for (StatusShengJIEnum statusShengJIEnum:StatusShengJIEnum.values()){
             if (id==statusShengJIEnum.getId()){
                 return statusShengJIEnum.getName();
             }
         }
         return null;
    }

}
